-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: publishing initium-cli as an NPM package #99
Conversation
This looks great, I'm not sure why but I also see the "detect language" changes in this PR. I believe that we might want to release this with |
I'm now debating if we should split this to its own repository. |
1- My idea was to add a language flag that would default to 2- If I'm not mistaken, we can define what is published with the package when running |
@nearform/initium this should be ready to merge. Can anybody take a look on the PR so we can merge it? |
This PR enables us to publish
initium-cli
as an NPM package.For publishing the package, see the docs: https://docs.npmjs.com/cli/v8/commands/npm-publish. I've tested it with this package I published and it worked fine. See for yourself:
This PR also implements code that checks for updates when the CLI is run via npx, from the
node_modules
folder, or when installed globally if the user hasnvm
installed.It also adds a new
projectLanguage
flag to initium-cli. If it's set toauto
, then the existing detectType code will run and detect the project language by the existing files (package.json, go.mod, and so on). If not, the initium-cli will take theINITIUM_PROJECT_LANGUAGE
or--project-language
variable values as the projectLanguage.TODO (PLEASE DON'T MERGE THIS YET!!!!): Set up an auth token in GitHub Actions' secrets, named
NPM_TOKEN
. I'll leave this for @LucaLanziani, once we figure out the Nearform account NPM permissions.This PR closes #78 and closes #74 as well.